<?php
namespace app\common\model;

use think\Model;

class Device extends Model
{
    // Define table name
    protected $table = 'gf_device';

    // Define auto timestamp
    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';
    protected $updateTime = false;

    // JSON fields
    protected $json = ['device_info'];

    // Define fields
    protected $schema = [
        'id'          => 'int',
        'platform'    => 'string',
        'device_info' => 'json',
        'create_time' => 'int'
    ];
}
